bitmask: Optimize no-op resizes
authorMatthias Clasen <mclasen@redhat.com>
Thu, 10 Sep 2015 22:48:29 +0000 (18:48 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 12 Sep 2015 15:24:37 +0000 (11:24 -0400)
commitc86f0b1b237bf8ccc47a5a5399a8acc55e0eb1fd
tree5a72d9b1d8c54b9d3d0ccae4bafdccd430fea59c
parent0957ba522008bc08631ee209b4dae8d7c5a7dce0
bitmask: Optimize no-op resizes

Statistics for the gtk3-demo listbox example show that the
vast majority of calls to _gtk_allocated_bitmask_resize go
from a size of 2 to 2. Don't needlessly call realloc() in
this case.
gtk/gtkallocatedbitmask.c